package com.jht.bletool2java.activity.blepage.fragment.blecontrol;

import android.bluetooth.BluetoothGattCharacteristic;
import android.bluetooth.BluetoothGattService;

import com.jht.bletool2java.activity.homepage.fragment.bledevice.bean.BLEDevice;

import java.util.List;
import java.util.Map;

public interface IBLEControl {

    interface UI {

    }

    interface Presenter {
        void connectBLE(BLEDevice ble_device);

        void closeConnect();

        List<BluetoothGattService> getAllServices();

        List<BluetoothGattCharacteristic> getAllCharacteristics();

        Map<String, List<BluetoothGattCharacteristic>> getServicesCharacteristicsMap();

        boolean readGatt(BluetoothGattCharacteristic characteristic);

        boolean writeGatt(BluetoothGattCharacteristic characteristic,byte[] data);

        boolean enableNotify(BluetoothGattCharacteristic characteristic,boolean enable);

        boolean enableIndication(BluetoothGattCharacteristic characteristic,boolean enable);
    }
}
